var mongoose = require("mongoose");
mongoose.connect("mongodb://127.0.0.1:27017/team9", { useNewUrlParser: true });
mongoose.connection.on("connected", function () {
  console.log("数据库连接成功");
});
mongoose.connection.on("error", function (err) {
  console.log(err);
});
mongoose.connection.on("disconnected", function () {
  console.log("连接断开");
});
module.exports = mongoose;
